package com.hxd.otc.common.enums;

import android.text.TextUtils;

public enum FloatPlatEnum {

    HUOBI("1", "火币"), OKEX("2", "okex"), OKCOIN("3", "okcoin");

    private String code;
    private String value;

    FloatPlatEnum(String code, String value) {
        this.code = code;
        this.value = value;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getValue() {
        return value;
    }

    public void setValue(String value) {
        this.value = value;
    }

    public static FloatPlatEnum getInstance(String code) {
        if (TextUtils.isEmpty(code)) return null;
        for (FloatPlatEnum floatPlatEnum : FloatPlatEnum.values()) {
            if (floatPlatEnum.getCode().equals(code)) {
                return floatPlatEnum;
            }
        }
        return null;
    }


}
